import instance from '@/utils/request'

export const getOrderList = (params) => {
  return instance({
    url: '/order/list',
    method: 'get',
    params,
  })
}
export const editOrder = ( data) => {

  return instance({
    url: '/order',
    method: 'put',
    data,
  })
}

export const deleteOrder = (id) => {
  return instance({
    url: `/order/${id}`,
    method: 'delete',
  })
}

export const addOrder = (data) => {


  return instance({
    url: '/order',
    method: 'post',
    data,
  })
}

export const payOrder = (data) => {
  return instance({
    url: '/order',
    method: 'put',
    data,
  })
}

export const getOrderDetail = (id) => {
  return instance({
    url: `/order/${id}`,
    method: 'get',
  })
}
